
import 'package:wallet/pages/main_page.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';

class GuidePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: PageView(children: <Widget>[
        Image.asset("assets/images/guide/guide1.webp"),
        Image.asset("assets/images/guide/guide2.webp"),
        Image.asset("assets/images/guide/guide3.webp"),
        GestureDetector(
          child: Image.asset("assets/images/guide/guide4.webp"),
          onTap: () {
            SharedPreferences.getInstance().then((SharedPreferences prefs) {
              prefs.setBool("guide", true);
              Navigator.of(context).pushReplacement(
                  MaterialPageRoute(builder: (BuildContext context) => MainPage()));
            });
          },
        )
      ]),
    );
  }
}
